package com.joker.orange.domain.bo;

import com.joker.common.core.domain.BaseEntity;
import com.joker.common.core.validate.AddGroup;
import com.joker.common.core.validate.EditGroup;
import lombok.Data;
import lombok.EqualsAndHashCode;
import javax.validation.constraints.*;

import java.math.BigDecimal;

/**
 * 订单管理业务对象 t_order
 *
 * @author Joker
 * @date 2024-07-31
 */

@Data
@EqualsAndHashCode(callSuper = true)
public class OrderBo extends BaseEntity {

    /**
     * 唯一标识
     */
    @NotNull(message = "唯一标识不能为空", groups = { EditGroup.class })
    private Long id;

    /**
     * 用户ID
     */
    @NotNull(message = "用户ID不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long userId;

    /**
     * 商品ID
     */
    @NotNull(message = "商品ID不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long productId;

    /**
     * 订单名称
     */
    @NotBlank(message = "订单名称不能为空", groups = { AddGroup.class, EditGroup.class })
    private String orderName;

    /**
     * 订单编号
     */
    @NotBlank(message = "订单编号不能为空", groups = { AddGroup.class, EditGroup.class })
    private String orderNo;

    /**
     * 订单描述
     */
    @NotBlank(message = "订单描述不能为空", groups = { AddGroup.class, EditGroup.class })
    private String orderDescription;

    /**
     * 订单金额
     */
    @NotNull(message = "订单金额不能为空", groups = { AddGroup.class, EditGroup.class })
    private BigDecimal orderAmount;

    /**
     * 订单状态（0-待支付、1-已支付、2-支付失败、3-支付异常、4-超时关闭）
     */
    @NotBlank(message = "订单状态（0-待支付、1-已支付、2-支付失败、3-支付异常、4-超时关闭）不能为空", groups = { AddGroup.class, EditGroup.class })
    private String orderStatus;

    /**
     * 订单类型（0-充值钻石、1-开通会员）
     */
    @NotBlank(message = "订单类型（0-充值钻石、1-开通会员）不能为空", groups = { AddGroup.class, EditGroup.class })
    private String orderType;


}
